// 封装数据库查询语句
var comment_sql = {
    insertOne: 'INSERT INTO article.commnet (fans_commnet, all_commnet, comment_state, essay_id) VALUES(?,?,?,?);',
    updateOne: 'UPDATE commnet c SET fans_commnet=?, all_commnet=?, comment_state=?, essay_id=? WHERE c.id=?;',
    deleteOne: 'DELETE FROM article.commnet WHERE id=?;',
    selectOneOrigin: 'select * FROM article.commnet c where c.id = ?',
    selectOne: 'SELECT c.id, fans_commnet, all_commnet, comment_state, e.title FROM article.commnet c left join essay e on e.id = c.essay_id where c.id = ?;',
    selectAll: 'SELECT c.id, fans_commnet, all_commnet, comment_state, e.title FROM article.commnet c left join essay e on e.id = c.essay_id;',
}
module.exports = comment_sql